<template>
  <el-table
    :data="projects"
    style="width: 1200px;margin: auto;"
    :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
    :default-sort="{prop: 'class'}"
    >
    <!--    default-expand-all="false"-->
    <el-table-column type="expand">
      <template slot-scope="props">
        {{$route.query.token}}
            <ProjectDetail :project="props.row" :token="$route.query.token"></ProjectDetail>
      </template>
    </el-table-column>
    <el-table-column
      prop="class"
      label="班级"
      width="80">
    </el-table-column>
    <el-table-column
      prop="authors"
      label="作者"
      width="240">
      <template slot-scope="scope">
        <span v-for="author in scope.row.authors" :key="author.name" style="margin-left: 5px">
          <el-tooltip :content="author.login" placement="top">
            <el-link >{{ author.name }}</el-link>
          </el-tooltip>
        </span>
      </template>
    </el-table-column>
    <el-table-column
      prop="url"
      label="项目地址">
      <template slot-scope="scope">
        <el-link type="primary" :href="scope.row.url" target="_blank">{{scope.row.url}}</el-link>
      </template>
    </el-table-column>
    <el-table-column
      prop="disUrl"
      label="发布地址">
      <template slot-scope="scope">
        <el-link type="primary" :href="scope.row.disUrl" target="_blank">{{scope.row.disUrl}}
        </el-link>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
import ProjectDetail from '@/components/ProjectDetail.vue';

export default {
  name: 'ProjectList',
  data() {
    return {
      projects:
        [
          {
            url: 'https://gitee.com/reroze/software-engineering-project.git',
            disUrl: 'http://reroze.gitee.io/software-engineering-project/',
            class: '1801',
            authors: [{
              login: 'chenjinggang',
              name: '陈劲钢',
            }, {
              login: 'reroze',
              name: '张浚哲',
            }, {
              login: 'howardy',
              name: '杨昊',
            }, {
              login: 'fcy2',
              name: '冯一村',
            }, {
              login: 'daydayup7',
              name: '王赫',
            }],
          },
          {
            url: 'https://gitee.com/so-will-love-disappear/werewolf-kill-unit',
            class: '1801',
            authors: [{
              login: 'sktt1ryze',
              name: '林国平',
            }, {
              login: 'zeliangzhang',
              name: '张泽良',
            }, {
              login: 'yzyuan',
              name: '尹泽源',
            }],
          },
          {
            url: 'https://gitee.com/tekky/software-engineering-app',
            class: '1801',
            authors: [{
              login: 'tekky',
              name: '王辰洋',
            }, {
              login: '',
              name: '张德洋',
            }, {
              login: '',
              name: '郑凯',
            }, {
              login: '',
              name: '杨天进',
            }],
          },
          {
            url: 'https://gitee.com/Starman-SWA/software-engineering-project',
            disurl: 'https://gitee.com/Starman-SWA/software-engineering-project',
            class: '1801',
            authors: [{
              login: 'KD_H',
              name: '陈铮',
            }, {
              login: 'Starman-SWA',
              name: '陈振华',
            }, {
              login: 'jiang-mingjiang',
              name: '蒋明江',
            }, {
              login: 'tang-boi',
              name: '唐博奕',
            }],
          },
          {
            url: 'https://gitee.com/geng_shangyi/university_computer_foundation',
            class: '1801',
            authors: [{
              login: '',
              name: '耿尚毅',
            }, {
              login: '',
              name: '张萌希',
            }, {
              login: '',
              name: '刘静蕾',
            }, {
              login: '',
              name: '次天钊',
            }],
          },
          {
            url: 'https://gitee.com/mou-ziyao/software-engineering',
            class: '1801',
            authors: [{
              login: '',
              name: '牟紫瑶',
            }, {
              login: '',
              name: ' 荣悦同',
            }, {
              login: '',
              name: '杜思仪',
            }],
          },
          {
            url: 'https://gitee.com/flyingcode001/software-engineering-project',
            class: '1801',
            authors: [{
              login: '',
              name: '王伟',
            }, {
              login: '',
              name: '王智远',
            }, {
              login: '',
              name: '孙宇飞 ',
            }, {
              login: '',
              name: '王耀',
            }, {
              login: '',
              name: '魏程帅',
            }],
          },
          {
            url: 'https://gitee.com/sktt1ryze/hust-se-chl',
            class: '1801',
            authors: [{
              login: '',
              name: '车春池',
            }, {
              login: '',
              name: '郝凯欣',
            }, {
              login: '',
              name: '李家伟',
            }],
          },
          {
            url: 'https://gitee.com/OVO-408/soft-engineering-project',
            class: '1802',
            authors: [{
              login: '',
              name: '汤岩',
            }, {
              login: '',
              name: '雷宇翔',
            }, {
              login: '',
              name: '吴扬九真',
            }, {
              login: '',
              name: '张敏杰',
            }],
          },
          {
            url: 'https://gitee.com/lengze_xuan/software-engineering-design',
            class: '1802',
            authors: [{
              login: '',
              name: '李祥威',
            }, {
              login: '',
              name: '李群力',
            }, {
              login: '',
              name: '冷泽烜',
            }],
          },
          {
            url: 'https://gitee.com/tianjincai/software-engineering-lab.git',
            class: '1802',
            authors: [{
              login: '',
              name: '刘纹硕',
            }, {
              login: '',
              name: '罗子航',
            }, {
              login: '',
              name: '林泽夫',
            }, {
              login: '',
              name: '田进财',
            }],
          },
          {
            url: 'https://gitee.com/kassy223/software-engineering',
            class: '1802',
            authors: [{
              login: '',
              name: '王晴',
            }, {
              login: '',
              name: '杨少凡',
            }, {
              login: '',
              name: '李月轩',
            }, {
              login: '',
              name: '沈宇菁',
            }],
          },
          {
            url: 'https://gitee.com/zr1696788479/soft-engineering-project',
            class: '1802',
            authors: [{
              login: '',
              name: '周然',
            }, {
              login: '',
              name: '葛洋',
            }, {
              login: '',
              name: '熊伟',
            }, {
              login: '',
              name: '易达',
            }],
          },
          {
            url: 'https://gitee.com/refugee-hust-2018CST/hust-software-engineering',
            class: '1802',
            authors: [{
              login: '',
              name: '张桢熙',
            }, {
              login: '',
              name: '刘治宏',
            }, {
              login: '',
              name: '王鋆侨',
            }],
          },
          {
            url: 'https://gitee.com/mou-ziyao/software-engineering',
            class: '1802',
            authors: [{
              login: '',
              name: '牟紫瑶',
            }, {
              login: '',
              name: '杜思仪',
            }, {
              login: '',
              name: '荣悦同',
            }],
          },
          {
            url: 'https://gitee.com/lyifanzero/selab',
            class: '1802',
            authors: [{
              login: '',
              name: '李一帆',
            }, {
              login: '',
              name: '陈家辉',
            }, {
              login: '',
              name: '李俊',
            }, {
              login: '',
              name: '李智源',
            }],
          },
          {
            url: 'https://gitee.com/walkerchi/dont-roll-it',
            class: '1802',
            authors: [{
              login: '',
              name: '迟明远',
            }, {
              login: '',
              name: '李文迪',
            }, {
              login: '',
              name: '崔子迈',
            }],
          },
          {
            url: 'https://gitee.com/yjz1/software-engineering-project',
            class: '1802',
            authors: [{
              login: '',
              name: '余学烨',
            }, {
              login: '',
              name: '揭百川',
            }, {
              login: '',
              name: '周无右',
            }],
          },
          {
            url: 'https://gitee.com/xubaixin/software-engineering.git',
            class: '1803',
            authors: [{
              login: '',
              name: '徐佰新',
            }, {
              login: '',
              name: '董根 ',
            }, {
              login: '',
              name: '杨晟',
            }, {
              login: '',
              name: '王辰潇',
            }],
          },
          {
            url: 'https://gitee.com/se424/se424',
            disUrl: 'https://gitee.com/se424/se424',
            class: '1803',
            authors: [{
              login: 'VZGH',
              name: '朱国欢',
            }, {
              login: 'han2001/tanghan',
              name: '唐寒',
            }, {
              login: '8bits',
              name: '羿子健',
            }, {
              login: 'yuchen',
              name: '徐煜辰',
            }],
          },
          {
            url: 'https://gitee.com/OVO-408/soft-engineering-project',
            class: '1803',
            authors: [{
              login: '',
              name: '黄键辉',
            }, {
              login: '',
              name: '张正沿',
            }, {
              login: '',
              name: '陈玮泽',
            }, {
              login: '',
              name: '蔡珂',
            }],
          },
          {
            url: 'https://gitee.com/canoriz/SEProject',
            class: '1803',
            authors: [{
              login: '',
              name: '曹以弘',
            }, {
              login: '',
              name: '谢汶泰',
            }, {
              login: '',
              name: '刘佳昊',
            }, {
              login: '',
              name: '黄钟逸',
            }],
          },
          {
            url: 'https://gitee.com/lightcml/east-12-427',
            class: '1803',
            authors: [{
              login: '',
              name: '周大伟',
            }, {
              login: '',
              name: '孟彦康',
            }, {
              login: '',
              name: '陈梦雷',
            }, {
              login: '',
              name: '李浩嘉',
            }],
          },
          {
            url: 'https://gitee.com/kassy223/software-engineering',
            class: '1803',
            authors: [{
              login: '',
              name: '杨少凡',
            }, {
              login: '',
              name: '沈宇菁',
            }, {
              login: '',
              name: '李月轩',
            }, {
              login: '',
              name: '王晴',
            }],
          },
          {
            url: 'https://gitee.com/tanle1999/software',
            class: '1803',
            authors: [{
              login: '',
              name: '赵浩程',
            }, {
              login: '',
              name: '谈乐',
            }, {
              login: '',
              name: '张伟治',
            }, {
              login: '',
              name: '郑朴',
            }],
          },
          {
            url: 'https://gitee.com/kenwey/source0',
            disUrl: 'http://106.54.52.97/',
            class: '1803',
            authors: [{
              login: '',
              name: '陈金麟',
            }, {
              login: '',
              name: '胡浩',
            }, {
              login: '',
              name: '谢杰印',
            }],
          },
        ],
    };
  },
  components: {
    ProjectDetail,
  },
};
</script>

<style scoped>

</style>
